package Q1;

import java.util.Scanner;

public class Solution {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        String str = scanner.next();

        int len = str.length();

        int preIndex = 0, curIndex = 0;
        int ret = 0;
        String retStr = "";
        while (curIndex < len) {

            //找到数字区间的左端点
            while (preIndex < len && (str.charAt(preIndex) < '0' || str.charAt(preIndex) > '9')) {
                preIndex++;
            }
            curIndex = preIndex;

            //找到数字区间的右端点
            while (curIndex < len && str.charAt(curIndex) >= '0' && str.charAt(curIndex) <= '9') {
                curIndex++;
            }

            if (ret < curIndex - preIndex) {
                ret = curIndex - preIndex;
                retStr = str.substring(preIndex, curIndex);
            }
            preIndex = curIndex;
        }

        System.out.println(retStr);
    }
}
